const mongoose = require('mongoose');
const mongoDB = 'mongodb://ssmAdmin:root@106.13.21.72:27017/ssm?authMechanism=DEFAULT&authSource=ssm';
mongoose.connect(mongoDB, { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.Promise = global.Promise;
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'MongoDB 连接错误：'));
db.once('open', function () {
    console.log("open");
});
db.once('close', function () {
    console.log("close");
});

const { findAllRecord } = require('../dao/sportDao');
findAllRecord();